package com.sg.controller.bff;

import com.sg.service.biz.bff.TypeCodeService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "TypeCode", tags = {"TypeCode"})
@RestController
// @RequestMapping("/oms/typeCode/")
public class TypeCodeController {

    @Autowired
    TypeCodeService typeCodeService;


    /**
     * B查询编码列表（公共）
     * gen by moon at 9/27/2022, 9:36:45 AM
     */
    @PostMapping("/oms/typeCode/queryCodeListCom")
    @ApiOperation(value = "B查询编码列表（公共）", response = OkrResult.class)
    public OkrResult<BffQueryCodeListComRespDto> queryCodeListCom(@RequestBody(required = false) @Validated BffQueryCodeListComReqDto reqDTO) {
        return OkrResult.success(typeCodeService.queryCodeListCom(reqDTO));
    }


}
